'use strict';

let utility = require('../common/utility.js');
let assert = require('assert');

describe('utility',function(){
    describe('utility.encrypt(pwd)', function() {
        it('可以正确的加密', function() {
            assert.deepStrictEqual('A94B799F5BAA15E95EBC3BA84E64A911', utility.encrypt('1qaz-'))
        });
    });

    describe('utility.createCabPwd(cabNo)', function() {
        it('可以正确的创建取件码', function() {
            Date.prototype.getTime = function() {
                return 123456789;
            }

            assert.deepStrictEqual('EA54', utility.createCabPwd('1-1-13'));
        });
    });
});
